<?

function getIP() 
{
	$ip;

	if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
	else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
	else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
	else $ip = false;

	return $ip;
}

function flash($flash_message) 
{
	$CI =& get_instance();
	$CI->session->set_flashdata('flash_message', $flash_message);
}